import axios from "axios";

export let get_list = () =>{
    return async (dispatch) =>{
        let {data} = await axios.get("/list") 
        dispatch({
            type:"GET_LIST",
            payload:data
        })
    }
}


export let add_todulist = (obj) => {
    return {
        type:"ADD_TODULIST",
        payload:obj
    }
}

export let del_todulist = (id) => {
    return {
        type:"DEL_TODULIST",
        payload:id
    }
}

export let edit_todulist = (obj) => {
    return {
        type:"EDIT_TODULIST",
        payload:obj
    }
}